package com.fly.modules.sys.controller;

import com.fly.modules.sys.entity.User;
import com.fly.modules.sys.utils.UserUtils;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by SWan on 2017/4/9.
 */
@Controller
@RequestMapping("/")
public class LoginController {

    @RequestMapping(value = "/index")
    public ModelAndView index(){
        System.out.println("index");
        ModelAndView mv = new ModelAndView("login");
        return mv;
    }

    @RequestMapping(value = "/sys/main")
    public ModelAndView login(User user){
        System.out.println("login");
        System.out.println(user.getLoginName());
        ModelAndView mv = new ModelAndView("main");
   //     mv.addObject("UserUtils", new UserUtils());
        return mv;
    }
}
